package com.jeesite.modules.isys.common.aop.check;

import com.jeesite.modules.isys.common.entity.MyPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class CheckList implements  CheckEntity<List>{
    @Autowired
    private CheckObject checkObject;
    @Override
    public List check(List list) throws Exception {
        List res = new ArrayList();
        for (Object object : list ){
            res.add(checkObject.check(object));
        }
        return res;
    }

    @Override
    public List checkArg(List list) throws Exception {
        List res = new ArrayList();
        for (Object object : list ){
            res.add(checkObject.checkArg(object));
        }
        return res;
    }
}
